Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hal_x86_64): be less stupid about ISR tracing #496

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Dec 30, 2024

Tracing in interrupt service routines can easily deadlock the kernel (c.f. c4183db). Let's be less dumb about it.

This commit does the following:

  • Factor out the code for forcefully unlocking the mutices around tracing outputs (VGA and serial) into a separate, unsafe function, and make the ISRs that are (currently) always a kernel oops just call that
  • Remove the trace in the "spurious interrupt" handler, as that seems like a good way to deadlock the universe. In future, let's have a way to track whether spurious interrupts have fired that doesn't involve emitting a trace (maybe counters?)

Tracing in interrupt service routines can easily deadlock the kernel
(c.f. c4183db). Let's be less dumb
about it.

This commit does the following:

- Factor out the code for forcefully unlocking the mutices around
  tracing outputs (VGA and serial) into a separate, unsafe function, and
  make the ISRs that are (currently) always a kernel oops just call that
- Remove the trace in the "spurious interrupt" handler, as that seems
  like a good way to deadlock the universe. In future, let's have a
  way to track whether spurious interrupts have fired that doesn't
  involve emitting a trace (maybe counters?)
@hawkw hawkw merged commit e23a00d into main Dec 30, 2024
18 checks passed
@hawkw hawkw deleted the eliza/lets-be-less-stupid-about-tracing-in-isrs branch December 30, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant